package ch5oopexer1;
/*1:圆类有半径属性和圆周率属性，有求面积和周长的方法（把圆周率定义为static），用oop模拟。*/
public class CircleTest {
    public static void main(String[] args) {
        Circle c = new Circle();
        c.setRadius(2.0);
        Circle.pi=3.14;
        System.out.println("面积为："+c.circleArea());
        System.out.println("周长为："+c.circlePerimeter());
        c.pi=4.2;
        System.out.println("面积为："+c.circleArea());
        System.out.println("周长为："+c.circlePerimeter());

    }
}
